#include <iostream>
using namespace std;

class lu{
public:
    lu(int i = 0){
        cout << 1;
    }
    lu(const lu& x){
        cout << 2;
    }
    lu& operator=(const lu& x){
        cout << 3;
        return *this;
    }
    ~lu(){
        cout << 4;
    }
};

void test1(){
    lu obj1(1);
    lu obj2(2);
    lu obj3 = obj1;
    obj2 = obj1;

}

class UnusualAdd{
public:
    int AddAB(int A, int B){
        if (A == 0)
            return B;
        if (B == 0)
            return A;
        int Xor = A ^ B;
        int And = (A & B) << 1;
        return AddAB(Xor,And);
    }
};

void Test1(){
    cout << UnusualAdd().AddAB(1,2);
}


//HJ91 走方格的方案数
//https://www.nowcoder.com/practice/e2a22f0305eb4f2f9846e7d644dba09b?tpId=37&tqId=21314&ru=/exam/oj

int dfs(int n, int m){
    if (n < 0 || m < 0)
        return 0;
    //到边界
    if (n == 0 || m == 0)
        return 1;
    return dfs(n - 1, m) + dfs(n, m - 1);
}

void Test2(){
    int n, m;
    while (cin >> n >> m)
        cout << dfs(n, m) << endl;
}

int main() {
    //test1();
    Test2();
    return 0;
}

